# include <iostream>
#include <functional>
using namespace std;
#include <algorithm>
class myCompare{
public:
    bool operator()(int v1,int v2){
        return v1>v2;
    }
};
void test01(){
    vector<int>v;
    v.push_back(10);
    v.push_back(40);
    v.push_back(60);
    v.push_back(20);
    for (vector<int>::iterator it=v.begin();it!=v.end();it++){
        cout<<*it<<" ";
    }
    cout<<endl;
    sort(v.begin(),v.end(),myCompare());
//    sort(v.begin(),v.end(),greater<int>());
    for (vector<int>::iterator it=v.begin();it!=v.end();it++){
        cout<<*it<<" ";
    }
    cout<<endl;
}
int main() {
test01();
    system("pause");
    return 0;
}
